package com.youpingou.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.Date;

@Data
@TableName(value = "tb_sku_comment")
public class SkuComment {
    @TableId(type = IdType.AUTO)
    private Integer id;

    @TableField(value = "created_at")
    @JsonProperty("created_at")
    private Date createdAt;

    @TableField(value = "updated_at")
    @JsonProperty("updated_at")
    private Date updatedAt;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    @JsonProperty("user_id")
    private Integer userId;

    @TableField(exist = false)
    private User user;

    /**
     * SPUID
     */
    @TableField(value = "spu_id")
    @JsonProperty("spu_id")
    private Integer spuId;

    /**
     * SKUID
     */
    @TableField(value = "sku_id")
    @JsonProperty("sku_id")
    private Integer skuId;

    /**
     * 0好评 1  中评   2 差评 
     */
    @TableField(value = "ratio")
    @JsonProperty("ratio")
    private Integer ratio;

    /**
     * 规格列表
     */
    @TableField(value = "spec_list")
    @JsonProperty("spec_list")
    private String specList;

    /**
     * 评论内容，最大600个字符
     */
    @TableField(value = "content")
    @JsonProperty("content")
    private String content;

    /**
     * 打分，1~5分
     */
    @TableField(value = "star")
    @JsonProperty("star")
    private Integer star;

    /**
     * 0 显示 1 不显示
     */
    @TableField(value = "isshow")
    @JsonProperty("isshow")
    private Integer isshow;

    @TableField(value = "sn")
    @JsonProperty("sn")
    private String sn;
}